package com.smooth.dao.gen;

import com.smooth.dao.gen.bean.BizOrder;
import com.smooth.dao.gen.bean.BizOrderExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface BizOrderMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_order
     */
    @SelectProvider(type=BizOrderSqlProvider.class, method="countByExample")
    long countByExample(BizOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_order
     */
    @DeleteProvider(type=BizOrderSqlProvider.class, method="deleteByExample")
    int deleteByExample(BizOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_order
     */
    @Delete({
        "delete from biz_order",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_order
     */
    @Insert({
        "insert into biz_order (id, good_id, ",
        "good_name, good_type, ",
        "good_desc, good_start_time, ",
        "good_end_time, good_num, ",
        "good_code, good_pic, ",
        "good_pics, stu_id, ",
        "stu_name, stu_tel_no, ",
        "price_jifen, order_status, ",
        "order_status_name, address_id, ",
        "province_id, province_name, ",
        "city_id, city_name, ",
        "area_id, area_name, ",
        "address_detail, shouhuo_name, ",
        "shouhuo_telno, post_code, ",
        "create_date, update_date)",
        "values (#{id,jdbcType=VARCHAR}, #{goodId,jdbcType=VARCHAR}, ",
        "#{goodName,jdbcType=VARCHAR}, #{goodType,jdbcType=SMALLINT}, ",
        "#{goodDesc,jdbcType=LONGVARCHAR}, #{goodStartTime,jdbcType=TIMESTAMP}, ",
        "#{goodEndTime,jdbcType=TIMESTAMP}, #{goodNum,jdbcType=INTEGER}, ",
        "#{goodCode,jdbcType=VARCHAR}, #{goodPic,jdbcType=VARCHAR}, ",
        "#{goodPics,jdbcType=VARCHAR}, #{stuId,jdbcType=VARCHAR}, ",
        "#{stuName,jdbcType=VARCHAR}, #{stuTelNo,jdbcType=VARCHAR}, ",
        "#{priceJifen,jdbcType=INTEGER}, #{orderStatus,jdbcType=SMALLINT}, ",
        "#{orderStatusName,jdbcType=VARCHAR}, #{addressId,jdbcType=VARCHAR}, ",
        "#{provinceId,jdbcType=VARCHAR}, #{provinceName,jdbcType=VARCHAR}, ",
        "#{cityId,jdbcType=VARCHAR}, #{cityName,jdbcType=VARCHAR}, ",
        "#{areaId,jdbcType=VARCHAR}, #{areaName,jdbcType=VARCHAR}, ",
        "#{addressDetail,jdbcType=VARCHAR}, #{shouhuoName,jdbcType=VARCHAR}, ",
        "#{shouhuoTelno,jdbcType=VARCHAR}, #{postCode,jdbcType=VARCHAR}, ",
        "#{createDate,jdbcType=TIMESTAMP}, #{updateDate,jdbcType=TIMESTAMP})"
    })
    int insert(BizOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_order
     */
    @InsertProvider(type=BizOrderSqlProvider.class, method="insertSelective")
    int insertSelective(BizOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_order
     */
    @SelectProvider(type=BizOrderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="good_id", property="goodId", jdbcType=JdbcType.VARCHAR),
        @Result(column="good_name", property="goodName", jdbcType=JdbcType.VARCHAR),
        @Result(column="good_type", property="goodType", jdbcType=JdbcType.SMALLINT),
        @Result(column="good_desc", property="goodDesc", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="good_start_time", property="goodStartTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="good_end_time", property="goodEndTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="good_num", property="goodNum", jdbcType=JdbcType.INTEGER),
        @Result(column="good_code", property="goodCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="good_pic", property="goodPic", jdbcType=JdbcType.VARCHAR),
        @Result(column="good_pics", property="goodPics", jdbcType=JdbcType.VARCHAR),
        @Result(column="stu_id", property="stuId", jdbcType=JdbcType.VARCHAR),
        @Result(column="stu_name", property="stuName", jdbcType=JdbcType.VARCHAR),
        @Result(column="stu_tel_no", property="stuTelNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="price_jifen", property="priceJifen", jdbcType=JdbcType.INTEGER),
        @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.SMALLINT),
        @Result(column="order_status_name", property="orderStatusName", jdbcType=JdbcType.VARCHAR),
        @Result(column="address_id", property="addressId", jdbcType=JdbcType.VARCHAR),
        @Result(column="province_id", property="provinceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="province_name", property="provinceName", jdbcType=JdbcType.VARCHAR),
        @Result(column="city_id", property="cityId", jdbcType=JdbcType.VARCHAR),
        @Result(column="city_name", property="cityName", jdbcType=JdbcType.VARCHAR),
        @Result(column="area_id", property="areaId", jdbcType=JdbcType.VARCHAR),
        @Result(column="area_name", property="areaName", jdbcType=JdbcType.VARCHAR),
        @Result(column="address_detail", property="addressDetail", jdbcType=JdbcType.VARCHAR),
        @Result(column="shouhuo_name", property="shouhuoName", jdbcType=JdbcType.VARCHAR),
        @Result(column="shouhuo_telno", property="shouhuoTelno", jdbcType=JdbcType.VARCHAR),
        @Result(column="post_code", property="postCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    List<BizOrder> selectByExample(BizOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_order
     */
    @Select({
        "select",
        "id, good_id, good_name, good_type, good_desc, good_start_time, good_end_time, ",
        "good_num, good_code, good_pic, good_pics, stu_id, stu_name, stu_tel_no, price_jifen, ",
        "order_status, order_status_name, address_id, province_id, province_name, city_id, ",
        "city_name, area_id, area_name, address_detail, shouhuo_name, shouhuo_telno, ",
        "post_code, create_date, update_date",
        "from biz_order",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="good_id", property="goodId", jdbcType=JdbcType.VARCHAR),
        @Result(column="good_name", property="goodName", jdbcType=JdbcType.VARCHAR),
        @Result(column="good_type", property="goodType", jdbcType=JdbcType.SMALLINT),
        @Result(column="good_desc", property="goodDesc", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="good_start_time", property="goodStartTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="good_end_time", property="goodEndTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="good_num", property="goodNum", jdbcType=JdbcType.INTEGER),
        @Result(column="good_code", property="goodCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="good_pic", property="goodPic", jdbcType=JdbcType.VARCHAR),
        @Result(column="good_pics", property="goodPics", jdbcType=JdbcType.VARCHAR),
        @Result(column="stu_id", property="stuId", jdbcType=JdbcType.VARCHAR),
        @Result(column="stu_name", property="stuName", jdbcType=JdbcType.VARCHAR),
        @Result(column="stu_tel_no", property="stuTelNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="price_jifen", property="priceJifen", jdbcType=JdbcType.INTEGER),
        @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.SMALLINT),
        @Result(column="order_status_name", property="orderStatusName", jdbcType=JdbcType.VARCHAR),
        @Result(column="address_id", property="addressId", jdbcType=JdbcType.VARCHAR),
        @Result(column="province_id", property="provinceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="province_name", property="provinceName", jdbcType=JdbcType.VARCHAR),
        @Result(column="city_id", property="cityId", jdbcType=JdbcType.VARCHAR),
        @Result(column="city_name", property="cityName", jdbcType=JdbcType.VARCHAR),
        @Result(column="area_id", property="areaId", jdbcType=JdbcType.VARCHAR),
        @Result(column="area_name", property="areaName", jdbcType=JdbcType.VARCHAR),
        @Result(column="address_detail", property="addressDetail", jdbcType=JdbcType.VARCHAR),
        @Result(column="shouhuo_name", property="shouhuoName", jdbcType=JdbcType.VARCHAR),
        @Result(column="shouhuo_telno", property="shouhuoTelno", jdbcType=JdbcType.VARCHAR),
        @Result(column="post_code", property="postCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    BizOrder selectByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_order
     */
    @UpdateProvider(type=BizOrderSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") BizOrder record, @Param("example") BizOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_order
     */
    @UpdateProvider(type=BizOrderSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") BizOrder record, @Param("example") BizOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_order
     */
    @UpdateProvider(type=BizOrderSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(BizOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_order
     */
    @Update({
        "update biz_order",
        "set good_id = #{goodId,jdbcType=VARCHAR},",
          "good_name = #{goodName,jdbcType=VARCHAR},",
          "good_type = #{goodType,jdbcType=SMALLINT},",
          "good_desc = #{goodDesc,jdbcType=LONGVARCHAR},",
          "good_start_time = #{goodStartTime,jdbcType=TIMESTAMP},",
          "good_end_time = #{goodEndTime,jdbcType=TIMESTAMP},",
          "good_num = #{goodNum,jdbcType=INTEGER},",
          "good_code = #{goodCode,jdbcType=VARCHAR},",
          "good_pic = #{goodPic,jdbcType=VARCHAR},",
          "good_pics = #{goodPics,jdbcType=VARCHAR},",
          "stu_id = #{stuId,jdbcType=VARCHAR},",
          "stu_name = #{stuName,jdbcType=VARCHAR},",
          "stu_tel_no = #{stuTelNo,jdbcType=VARCHAR},",
          "price_jifen = #{priceJifen,jdbcType=INTEGER},",
          "order_status = #{orderStatus,jdbcType=SMALLINT},",
          "order_status_name = #{orderStatusName,jdbcType=VARCHAR},",
          "address_id = #{addressId,jdbcType=VARCHAR},",
          "province_id = #{provinceId,jdbcType=VARCHAR},",
          "province_name = #{provinceName,jdbcType=VARCHAR},",
          "city_id = #{cityId,jdbcType=VARCHAR},",
          "city_name = #{cityName,jdbcType=VARCHAR},",
          "area_id = #{areaId,jdbcType=VARCHAR},",
          "area_name = #{areaName,jdbcType=VARCHAR},",
          "address_detail = #{addressDetail,jdbcType=VARCHAR},",
          "shouhuo_name = #{shouhuoName,jdbcType=VARCHAR},",
          "shouhuo_telno = #{shouhuoTelno,jdbcType=VARCHAR},",
          "post_code = #{postCode,jdbcType=VARCHAR},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(BizOrder record);
}